#include "widget.h"
#include "ui_widget.h"
#include<QDebug>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_clicked()
{
    QDateTime timeold = ui->dateTimeEdit->dateTime();
    QDateTime timenew = ui->dateTimeEdit_2->dateTime();
    qDebug()<<timeold<<timenew;

    int seconds = timeold.secsTo(timenew);
    int hours=(seconds/3600)%24;
